<?

JCAT_Package::ImportClass('JCAT_ViewGtk',JCAT::PACKAGE_MVCGTK) ;

class DlgHeadView extends JCAT_ViewGtk
{
	/**
	 * 所有 对话框 Head 部分
	 * 
	 * @access	public
	 * @param	$aParent=null	JCAT_ViewGtk		拥有此视图的对象
	 * @param	$aUI=null		JCAT_UIGtkGlade		模版引擎
	 * @return	array
	 */
	public function DlgHeadView( JCAT_IViewContainer $aParent, JCAT_UIGtkGlade $aUI=null )
	{
		$this->JCAT_ViewGtk('DlgHeadView','DlgHeadView','VBoxDialogHead',$aParent,$aUI) ;
		
		
	}
	
	
	/**
	 * 初始化 视图
	 *
	 * @access	public
	 * @return	void
	 */
	public function OnInitView()
	{
		// JCAT Logo
		$wndImgLogo = $this->GetChildWidget('ImgLogo') ;
		JCAT_ASSERT::ASSERT_INSTANCE($wndImgLogo,'GtkImage');
		
		$wndImgLogo->set_from_file( ROOT_PATH.'Resource/Image/logo2.png' ) ;
		$wndImgLogo->set_alignment( 0, 1 ) ;

	
		// 樣式菜单
		JCAT_Package::ImportClass('JCAT_GtkStyleSwitchMenu',JCAT::PACKAGE_MVCGTK) ;
		
		$aStyleMenu = new JCAT_GtkStyleSwitchMenu(ROOT_PATH.'Style/') ;
		$aUIStyleMenuItem = $this->GetChildWidget('UIStyleMenuItemInMenuBar') ;
		JCAT_ASSERT::ASSERT_INSTANCE($aUIStyleMenuItem,'GtkMenuItem') ;
		$aUIStyleMenuItem->set_submenu($aStyleMenu->GetMenu()) ;

		// 另一个
		$aUIStyleMenuItem = $this->GetChildWidget('UIStyleMenuItem') ;
		JCAT_ASSERT::ASSERT_INSTANCE($aUIStyleMenuItem,'GtkMenuItem') ;
		$aUIStyleMenuItem->set_submenu($aStyleMenu->GetMenu()) ;
		
		
	}
	
	
}

?>